package net.kangyee.eventmanager.commands;

import org.bukkit.entity.Player;

import net.kangyee.eventmanager.EventManager;
import net.kangyee.eventmanager.util.MessageManager;

public class CmdG extends EventManagerCommand {
	
	private EventManager plugin;
	
	public CmdG(EventManager plugin){
		this.plugin = plugin;
	}

	public void onCommand(Player player, String[] args){
        for(Player localPlayer : plugin.regPlayers.keySet()){
        	MessageManager.sendAdminMessage(localPlayer, args[1]);
    	}
		return;
	}

	public String getCmdName(){
		return "g";
	}

	public String getArgs(){
		return "<消息内容>";
	}
	
	public int getMaxArgs(){
		return 2;
	}

	public int getMinArgs(){
		return 2;
	}

	public String getPermission(){
		return "eventmanager.admin." + getCmdName();
	}

	public boolean getStateRequire(){
		return true;
	}
	
	public boolean getRegPCRequire() {
		return true;
	}
}
